from django.conf.urls import url


from . import views

urlpatterns = [
    # 发送短信验证码
    url(r'sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SMSCodeView.as_view()),
    # 获取图片验证码
    url(r'image_codes/(?P<image_code_id>.*)/$', views.GetImageCodeView.as_view()),
    # 找回密码第一步 获取图片ID和用户名
    url(r'accounts/(?P<username>.*)/sms/token/$', views.FindPassWord1View.as_view()),
    # 找回密码第二步,发送短信验证码
    url(r'sms_codes/$', views.FindPassWord2View.as_view()),
    # 找回密码第二步,检测短信验证码
    url(r'accounts/(?P<username>.*)/password/token/$', views.FindPassWord3View.as_view()),
    # 找回密码第三步及登录用户修改密码
    url(r'users/(?P<user_id>.*)/password/$', views.FindPassWord4View.as_view()),
]


# 请求路径 accounts/liangang/password/token/?sms_code=508773
# 请求路径/accounts/liangang/sms/token/?text=FPFM&image_code_id=a1dca68c-893c-4cb0-85ae-d8efe14b3b02
# 找回密码第二步,发送短信验证码